AddCSLuaFile( "shared.lua" )

SWEP.Weight				= 5
SWEP.AutoSwitchTo		= false
SWEP.AutoSwitchFrom		= false

SWEP.DrawAmmo			= false
SWEP.DrawCrosshair		= false
SWEP.ViewModelFOV		= 75
SWEP.ViewModelFlip		= false
SWEP.CSMuzzleFlashes	= false

SWEP.Author						= "blankthemuffin / -Anders-"
SWEP.Contact					= "don't even try"
SWEP.Purpose					= "None really"
SWEP.Instructions				= "maybe I need shit in here"

SWEP.Spawnable					= false
SWEP.AdminSpawnable				= false

SWEP.ViewModel					= "models/weapons/v_knife_t.mdl"
SWEP.WorldModel					= "models/weapons/w_knife_t.mdl"

SWEP.Primary.Damage				= 60
SWEP.Primary.Delay				= 0.5
SWEP.Primary.ClipSize			= -1
SWEP.Primary.DefaultClip		= -1
SWEP.Primary.Automatic			= false
SWEP.Primary.Ammo				= "none"

SWEP.Secondary.ClipSize			= -1
SWEP.Secondary.DefaultClip		= -1
SWEP.Secondary.Automatic		= false
SWEP.Secondary.Ammo				= "none"


--[[-------------------------------------------------------------------------------------------------
 PrimaryAttack 
 Called when we shoot. :D
-------------------------------------------------------------------------------------------------]]--
SWEP.NextPrimaryFire = 0
function SWEP:PrimaryAttack()

	if CurTime() > self.NextPrimaryFire then
	
		self.NextPrimaryFire = CurTime() + self.Primary.Delay
	
		if SERVER then
		
			--TODO: This thing does not seem too be working!
			self.Owner:TraceHullAttack( 	self.Owner:GetShootPos(), 
											self.Owner:GetAimVector() * 100, 
											Vector( -32, -32, -32 ), 
											Vector( 32, 32, 32 ), 
											self.Primary.Damage, 
											DMG_SLASH, 
											true )
			
			self.Weapon:SendWeaponAnim( ACT_VM_HITCENTER ) 		// View model animation
			self.Owner:SetAnimation( PLAYER_ATTACK1 )				// 3rd Person Animation	
		
		end
	
	end

end

--[[-------------------------------------------------------------------------------------------------
 CanSecondaryAttack, 
-------------------------------------------------------------------------------------------------]]--
function SWEP:CanSecondaryAttack()
	return true
end

--[[-------------------------------------------------------------------------------------------------
 SecondaryAttack, 
-------------------------------------------------------------------------------------------------]]--
function SWEP:SecondaryAttack()

	-- Toggle cloak.
	if self.Owner:GetVar( "IsCloaked", false ) then
		self.Owner:UnCloak()
	else 
		self.Owner:Cloak()
	end
	
end
